/*
 * tasklist.cpp
 *
 *  Created on: 2011-5-28
 *      Author: chenl
 */

#include "tasklist.h"
#include "task_wrapper.h"

int32_t CTaskHashList::InsertTask(CTask& task)
{
	std::pair<TaskHashListItr, bool> result = taskHashList_.insert(
			std::pair<pid_t, CTask*>(task.task.pid, &task));
	if (!result.second)
	{
		return E_PS_INSERTHASHLISTFAIL;
	}
	return S_OK;
}
